package com.datang.springcode.incidentMonitor;

import org.springframework.context.ApplicationListener;

//实现ApplicationListener使其成为监听类，监听的对象就是 BlackListEvent
public class BlackListNotifier implements ApplicationListener<BlackListEvent> {
    @Override
    public void onApplicationEvent(BlackListEvent event) {
        System.out.println(event.getAddress() + "已被列入黑名单，不能发送邮件订阅者1");
    }

}
